Full Template Specialization

A template definition:

template <class T>class vector { ... }

specialized:

template <> class
vector<bool> { ... }


The real template definition:

template <class T, class Allocator = allocator<T> >class vector
{... }

specialized for T and the default allocator:

template <>class vector<bool, allocator<bool> >    // note space, not ">>"
{ ... }


Partial Template Specialization

The real template definition:

template <class T, class Allocator = allocate<T> > // note space class vector { ... }

specialized for T, but not for Allocator:

template <class Allocator>class vector<bool, Allocator>{ ... }

template <class T, class Allocator>class vector<T*, Allocator>{ ... }